package com.example.treinamentotiroaoalvo;

import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Rect;

public class AimBehaviour 
{
	public Bitmap aim;
	Paint paint;
	Rect rect;
	
	public AimBehaviour()
	{
		paint = new Paint();
		paint.setColor(Color.BLACK);
		
		aim = BitmapStorage.getInstance().getAimImage();
		
		rect = new Rect();
		rect.set((GameLoop.canvasWidth/2) - (aim.getWidth()/2), (GameLoop.canvasHeight/2) - (aim.getHeight()/2), (GameLoop.canvasWidth/2) + (aim.getWidth()/2), (GameLoop.canvasHeight/2) + (aim.getHeight()/2));
	}
	
	public void draw(Canvas canvas)
	{
		canvas.drawBitmap(aim, null, rect, paint);
	}
	
	public Rect getAimRect()
	{
		return rect;
	}
}
